source("DHMM.R")
hmm=initDHMM(States=c("1","2"), Symbols=c("A","C", "T","G"), duration=list(1:5,1:10),emisProbs=matrix(c(.4,.1,.4,.1,.1,.4,.1,.4),nrow=2))
print(hmm)
#simulation
res=simHMM(hmm,100)
print(res)
#forward
#lForwardProbs=forward(hmm,res$observation)
#print(exp(lForwardProbs))
a=check_fb(hmm, res$observation)
print(c("a=",a))

trHMM=baumWelch(hmm, res$observation)
print(trHMM)